Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bser

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bser

JavaScript implementation of the BSER Binary Serialization

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16M
decreased by-26.96%
Maintainers
2
Weekly downloads
 
Created

What is bser?

The 'bser' npm package is designed to encode and decode Binary Serialized Object Representation (BSER) format. BSER is a binary format used primarily for efficient data serialization and communication, particularly in applications where performance is critical. It is commonly used in conjunction with the Watchman file watching service.

What are bser's main functionalities?

Encoding to BSER

This feature allows you to encode JavaScript objects into BSER format. The example shows how to encode a simple object containing a greeting message.

const bser = require('bser');
const data = { hello: 'world' };
const encoded = bser.dumpToBuffer(data);
console.log(encoded);

Decoding from BSER

This feature enables the decoding of BSER formatted data back into JavaScript objects. The code sample demonstrates decoding a BSER encoded buffer to retrieve the original object.

const bser = require('bser');
const encoded = Buffer.from([0, 1, 3, 11, 1, 5, 104, 101, 108, 108, 111, 2, 5, 119, 111, 114, 108, 100]);
const decoded = bser.loadFromBuffer(encoded);
console.log(decoded);

Other packages similar to bser

Keywords

FAQs

Package last updated on 27 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc